package com.woniuxy.service.impl;

import com.woniuxy.domain.Dealtime;
import com.woniuxy.dto.DtoSubmitBugInfo;
import com.woniuxy.dto.DtoSubmitBugInfoVO;
import com.woniuxy.mapper.DealtimeMapper;
import com.woniuxy.service.DealtimeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author XXX
 * @since 2021-05-12
 */
@Service
public class DealtimeServiceImpl extends ServiceImpl<DealtimeMapper, Dealtime> implements DealtimeService {

    @Override
    public Dealtime createRecord(DtoSubmitBugInfoVO dtoSubmitBugInfoVO) {
        DtoSubmitBugInfo info = dtoSubmitBugInfoVO.getInfo();
        Dealtime dealtime = new Dealtime();
        dealtime.setBugId(info.getBugId())
                .setPtime(info.getPtime())
                .setRtime(info.getStime())
                .setStarttime(info.getRstartetime())
                .setEndtime(info.getRendtime())
                .setRecordState("完成")
                .setDealbyName(info.getDealName())
                .setFileAddress(dtoSubmitBugInfoVO.getUrl());
        return dealtime;
    }
}
